

import request from '@/utils/request'

const userBaseUrl = process.env.VUE_APP_CONTENXT_PATH + "/food";


export function findFoodInfoByCondition(query) {
    return request({
        url: userBaseUrl + '/listByCondition',
        method: 'get',
        params: query
    })
}


export function submitFood(data) {
    return request({
        url: userBaseUrl + '/add',
        method: 'post',
        data: data
    })
}


export function submitEditFood(data) {
    return request({
        url: userBaseUrl + '/edit',
        method: 'post',
        data: data
    })
}

export function deleteFoodById(id) {
    return request({
        url: userBaseUrl + '/delete',
        method: 'get',
        params: {
            foodInfoId: id
        }
    })
}



